﻿@using BBICMS.Infrastructure
@model BBICMS.Model.ViewModel.Front.ArticlesVM

@{
    ViewBag.Title = Title.News;
    Layout = "~/Views/Shared/_Layout.cshtml";
}



@section featured{   
    <div class="container sitepath">        
        <ol class="breadcrumb">
            <li><a href="/">@Menu.Home</a></li>
            <li>&gt;</li>
            <li class="active">@Menu.News</li>
        </ol>             
    </div>
    
}

    <!-- BLOG ================================================== -->
    <section class="container page-news" >
        <div class="row">
            <div class="col-md-10 col-md-offset-1 animated fadeInLeft">

                @foreach (var post in Model.Posts)
    {

            <a class="item" href="@Url.Action("detail",new { id = post.Id})">
                <div class="thumbnail">
                    <img src="@post.Thumbnail" alt="@post.Title">
                </div>
                <div class="des">
                    <h3>@post.Title</h3>

                    <div class="note">
                        <ul>
                            <li>
                                By @post.Author
                            </li>
                            <li>
                                @string.Format("{0:D}", post.Pubdate)
                            </li>
                        </ul>
                    </div>

                    <p>@post.Summary</p>

                </div>
            </a>

}
                @if (Model.Posts.Any())
    {
            <div class="text-center">
                <ul class="pagination">
                    @Html.PageLinks(Model.PagingInfo, x => Url.Action("Index", new { Page = x }))
                </ul>
            </div>
}
else
{
            <div class="alert alert-info">
                <i class="iconfont icon-info"></i>  @Messages.NotFoundItem
            </div>
}

            </div>
            


        </div>

       

     
      
    </section>






  @section scripts{
    <script>
       $(function () {
           //当前菜单
           $(".menu>ul>li:nth-of-type(5) a").addClass("active");
       })
    </script>
}
